<script setup>
import { ref } from 'vue'

const props = defineProps({
  value: {
    type: String,
    default: ''
  }
})

const count = ref(0)

const emit = defineEmits(['update:value'])
const value = ref('')
</script>

<template>
  <p>props.value: {{ props.value }}</p>
  <p>{{ props.value }}</p>
  <h2 v-bind="$attrs">
    <slot>233</slot>
  </h2>
  <h3 v-bind="$attrs">
    <slot name="title">
      2333
    </slot>
  </h3>
  <input type="text" v-model="value">
  <button @click="emit('update:value', value)">更新</button>
</template>

<style scoped>
.red {
  background-color: aqua;
  color: blueviolet;
}
</style>
